		var total = 31;//总页数
		var pageBarNum = 15;//分页块数量
    	var maxNow = 0;//当前已加载分页块数量
    	var pageSize = 20;//每页数据数量
    	var nowPageObj = $("#pageBox").children().first();//初始化当前已选页  默认第一页
    	var porjectState = 1;// 0 未开始 1 评估中 2 待审核  3 已完成
    	function init(){
    		

	    	//以下为分页事件
	    	var pageBoxObj = $("#pageBox");
	    	pageSize = $("#pageSize").val();

	    	
	    	if(pageBarNum < total){
	    		loadPageBar(maxNow);
	    	}else{
	    		loadPageBar(0);
	    	}
	    	
	    	
	    	$("#pageSize").bind('change',function(){
	    		pageSize = $(this).val();
	    		resetPageSize(pageSize);
	    		
	    	});
	    	
	    	$("#lastPage").bind('click',function(){
	    		var ps = nowPageObj.text();
	    		var p = ps;
	    		aIndex = nowPageObj.index();
	    		if(aIndex == 0){
	    			if(ps ==1 ){
	    				alert("当前已是首页！");
	    			}else{
	    				loadPrePageBar(ps);
	    			}
	    			
	    		}else{
	    			p--;
	    			nowPageObj.attr("style","background-color: #eeeeee;");
		    		nowPageObj = nowPageObj.prev();
		    		nowPageObj.attr("style","background-color: #33ffff;")
		    		loadPageData(nowPageObj.text());
	    		}
	    	});
	    	$("#nextPage").bind('click',function(){
	    		var p = nowPageObj.text();
	    		var pe =$("#pageBox").children().last().text();
	    		if(p==pe){
	    			if(pe==total){
	    				alert("当前已是末页！");
	    				return;
	    			}
	    			loadPageBar(maxNow);
	    		}else{
	    			p++;
	    			nowPageObj.attr("style","background-color: #eeeeee;");
		    		nowPageObj = nowPageObj.next();
		    		nowPageObj.attr("style","background-color: #33ffff;");
		    		loadPageData(nowPageObj.text());
	    		}
	    	});
	    	bindPageBar();
	    	//分页块向后翻页
    		$("#forward").bind("click",function(){
    			nextPageBar(maxNow);
    		});
    		//分页块向前
    		$("#backward").bind("click",function(){
    			prePageBar($("#pageBox").children().first().text());//参数为当前最小页数
    		});
    		
    		
    	}
    	init();
    	
    	
    	
    	
    	
    //加载分页块
    	function loadPageBar(pageNum){
    		var content = "";
    		var t = pageNum+pageBarNum;
    		
    		if(t>total){
    			
    			endNum = total;
    			maxNow = total;
    		}else{
    			endNum = t;
    			maxNow = maxNow + pageBarNum;
    		}
    		$("#pageBox").html("");
    		for(var i = pageNum+1;i <= endNum;i++){
    			content = content+'<a id="pg'+i+'" class="btn btn-sm" style="background-color: #eeeeee;border: none;margin-left: 4px;">'+i+'</a>';

    		}
    		
    		$("#pageBox").append(content);
    		bindPageBar();//元素删除后需要重新绑定
    		//分页数据加载完后 默认加载第一页数据
    		nowPageObj = $("#pageBox").children().first();
    		loadPageData(nowPageObj.text());
    		
    	}
    	
    	function loadPrePageBar(minNow){
    		var content = "";
    		var startNum = 1;
    		var t = minNow-pageBarNum;
    		if(t >= 1){
    			startNum = t;
    		}else{
    			alert("没有更多数据了！");
    			return;
    		}
    		$("#pageBox").html("");
    		for(var i = startNum;i <= minNow-1;i++){
    			content = content+'<a id="pg'+i+'" class="btn btn-sm" style="background-color: #eeeeee;border: none;margin-left: 4px;">'+i+'</a>';

    		}
    		
    		$("#pageBox").append(content);
    		bindPageBar();//元素删除后需要重新绑定
    		//分页数据加载完后 默认加载第一页数据
    		nowPageObj = $("#pageBox").children().first();
    		loadPageData(nowPageObj.text());
    		
    	}
    	
    	
    	
    	function bindPageBar(){
    		//分页块点击事件
    		$(".pageBox a").unbind("click");
	    	$(".pageBox a").bind("click",function(){
	    		nowPageObj.attr("style","background-color: #eeeeee;");
	    		nowPageObj = $(this);
	    		nowPageObj.attr("style","background-color: #33ffff;");
	    		loadPageData(nowPageObj.text());
	    	});
    	}
    	
    	function nextPageBar(){
    		if(maxNow < total){
    			loadPageBar(maxNow);
    		}else{
    			alert("没有更多数据了！");
    		}
    	}
    	function prePageBar(minNow){
    		if(minNow==1){
    			alert("没有更多数据了！")
    		}else{
    			loadPrePageBar(minNow);
    		}
    	}
    	//当分页数量变化时  重新加载事件
    	function resetPageSize(pageSize){
    		getDataNum();
    		total = 3;//函数回调时修改页面总数
    		loadPageBar(0);
    		$("#totalPage").text(total);
    		
    	}
    	/*
    	 加载分页页面数据
    	 * */
    	function loadPageData(pageNow){
    		nowPageObj.attr("style","background-color: #33ffff;")
    		console.log("加载第"+pageNow+"页数据，每页条数"+pageSize);
    	}
    	
    	